package com.peng.test.obj;

import org.openjdk.jol.info.ClassLayout;

/**
 * HelloJol
 * 使用jol 库将 对象的内存结构打印出来
 *
 * @author: lupeng6
 * @create: 2021/1/25 21:40
 */
public class HelloJol {

    public static void main(String[] args) {
//        Object o = new Object();
//        String s = ClassLayout.parseInstance(o).toPrintable();
//        System.out.println(s);


        Test test = new Test(1);
        String s = ClassLayout.parseInstance(test).toPrintable();
        System.out.println(s);
    }


}
